package com.wzt.lianfirecontrol.bean.recode.home;

import com.wzt.lianfirecontrol.bean.BaseModel;

import java.util.ArrayList;
import java.util.List;

/**
 * 表格
 */
public class ChartsModel extends BaseModel {
    private String chartTitle;
    private List<String> xAxis;
    private List<String> yAxis;
    private String unit;
    private String isPercentage;
    private StatisticBean.DataBean.SuperviseAlarmCountBean superviseAlarmCount; // 监管
    private StatisticBean.DataBean.FireAlarmCountBean fireAlarmCount; // 火警
    private StatisticBean.DataBean.RiskAlarmCountBean riskAlarmCount;
    private StatisticBean.DataBean.EarlyAlarmCountBean earlyAlarmCount;
    public static class SuperviseAlarmCountBean {
        /**
         * count : {"sumCount":"2","count1":"0","count2":"2"}
         */

        private StatisticBean.DataBean.SuperviseAlarmCountBean.CountBean count;

        public StatisticBean.DataBean.SuperviseAlarmCountBean.CountBean getCount() {
            return count;
        }

        public void setCount(StatisticBean.DataBean.SuperviseAlarmCountBean.CountBean count) {
            this.count = count;
        }

        public static class CountBean {
            /**
             * sumCount : 2
             * count1 : 0
             * count2 : 2
             */

            private String sumCount;
            private String count1;
            private String count2;

            public String getSumCount() {
                return sumCount;
            }

            public void setSumCount(String sumCount) {
                this.sumCount = sumCount;
            }

            public String getCount1() {
                return count1;
            }

            public void setCount1(String count1) {
                this.count1 = count1;
            }

            public String getCount2() {
                return count2;
            }

            public void setCount2(String count2) {
                this.count2 = count2;
            }
        }
    }

    public static class FireAlarmCountBean {
        /**
         * count : {"sumCount":"22","count1":"1","count2":0}
         */

        private StatisticBean.DataBean.FireAlarmCountBean.CountBeanX count;

        public StatisticBean.DataBean.FireAlarmCountBean.CountBeanX getCount() {
            return count;
        }

        public void setCount(StatisticBean.DataBean.FireAlarmCountBean.CountBeanX count) {
            this.count = count;
        }

        public static class CountBeanX {
            /**
             * sumCount : 22
             * count1 : 1
             * count2 : 0
             */

            private String sumCount;
            private String count1;
            private int count2;

            public String getSumCount() {
                return sumCount;
            }

            public void setSumCount(String sumCount) {
                this.sumCount = sumCount;
            }

            public String getCount1() {
                return count1;
            }

            public void setCount1(String count1) {
                this.count1 = count1;
            }

            public int getCount2() {
                return count2;
            }

            public void setCount2(int count2) {
                this.count2 = count2;
            }
        }
    }

    public static class RiskAlarmCountBean {
        /**
         * count : {"sumCount":"12","count1":"10","count2":"2"}
         */

        private StatisticBean.DataBean.RiskAlarmCountBean.CountBeanXX count;

        public StatisticBean.DataBean.RiskAlarmCountBean.CountBeanXX getCount() {
            return count;
        }

        public void setCount(StatisticBean.DataBean.RiskAlarmCountBean.CountBeanXX count) {
            this.count = count;
        }

        public static class CountBeanXX {
            /**
             * sumCount : 12
             * count1 : 10
             * count2 : 2
             */

            private String sumCount;
            private String count1;
            private String count2;

            public String getSumCount() {
                return sumCount;
            }

            public void setSumCount(String sumCount) {
                this.sumCount = sumCount;
            }

            public String getCount1() {
                return count1;
            }

            public void setCount1(String count1) {
                this.count1 = count1;
            }

            public String getCount2() {
                return count2;
            }

            public void setCount2(String count2) {
                this.count2 = count2;
            }
        }
    }

    public static class EarlyAlarmCountBean {
        /**
         * count : {"sumCount":"0","count1":"0","count2":0}
         */

        private StatisticBean.DataBean.EarlyAlarmCountBean.CountBeanXXX count;

        public StatisticBean.DataBean.EarlyAlarmCountBean.CountBeanXXX getCount() {
            return count;
        }

        public void setCount(StatisticBean.DataBean.EarlyAlarmCountBean.CountBeanXXX count) {
            this.count = count;
        }

        public static class CountBeanXXX {
            /**
             * sumCount : 0
             * count1 : 0
             * count2 : 0
             */

            private String sumCount;
            private String count1;
            private int count2;

            public String getSumCount() {
                return sumCount;
            }

            public void setSumCount(String sumCount) {
                this.sumCount = sumCount;
            }

            public String getCount1() {
                return count1;
            }

            public void setCount1(String count1) {
                this.count1 = count1;
            }

            public int getCount2() {
                return count2;
            }

            public void setCount2(int count2) {
                this.count2 = count2;
            }
        }
    }


    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getIsPercentage() {
        return isPercentage;
    }

    public void setIsPercentage(String isPercentage) {
        this.isPercentage = isPercentage;
    }

    private List<HomeTendModel> homeTendModels;

    public String getChartTitle() {
        return chartTitle;
    }

    public void setChartTitle(String chartTitle) {
        this.chartTitle = chartTitle;
    }

    public List<String> getxAxis() {
        if (null != homeTendModels && homeTendModels.size() > 0){
            List<String> list = new ArrayList<>();
            for (int i = 0; i < homeTendModels.size(); i++){
                list.add(""+i);
            }
            return list;
        }
        return xAxis;
    }

    public List<String> getyAxis() {
        if (null != homeTendModels && homeTendModels.size() > 0){
            List<String> list = new ArrayList<>();
            for (int i = 0; i < homeTendModels.size(); i++){
                list.add(homeTendModels.get(i).getWarnSum());
            }
            return list;
        }
        return yAxis;
    }

    public void setxAxis(List<String> xAxis) {
        this.xAxis = xAxis;
    }


    public void setyAxis(List<String> yAxis) {
        this.yAxis = yAxis;
    }

    public List<HomeTendModel> getHomeTendModels() {
        return homeTendModels;
    }

    public void setHomeTendModels(List<HomeTendModel> homeTendModels) {
        this.homeTendModels = homeTendModels;
    }

    public ChartsModel() {
    }
}
